package com.ldy.seal.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ldy.seal.entity.UserCert;

public interface UserCertMapper extends BaseMapper<UserCert>{

	@Select("<script>"
			+ "select * from user_cert t where 1=1 "
			  + "<if test='search !=null and search != \"\"'>and (t.user_id like CONCAT('%',#{search},'%') or t.user_name like CONCAT('%',#{search},'%')) </if>"
			   + " order by t.last_update_time desc"
              + "</script>")
	List<UserCert> selectUserPage(Page<UserCert> page, @Param("search") String searchText);

}
